/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Telas;

import javax.swing.JFrame;

/**
 *
 * @author AELSON
 */
public class Principal extends javax.swing.JDialog {

    public Principal(String login) {
        initComponents();
        setModal(true);

        LabelUsuario.setText(login.toUpperCase());

    }


    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jPanel1 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        btSairtela = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        LabelUsuario = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        menu_cadastro = new javax.swing.JMenu();
        cadFunci = new javax.swing.JMenuItem();
        prod = new javax.swing.JMenuItem();
        cadFornecedor = new javax.swing.JMenuItem();
        setor = new javax.swing.JMenuItem();
        undS = new javax.swing.JMenuItem();
        menu_relatorios = new javax.swing.JMenu();
        rlProdutos = new javax.swing.JMenuItem();
        rlSaidaProd = new javax.swing.JMenuItem();
        rlESF = new javax.swing.JMenuItem();
        relFunc = new javax.swing.JMenuItem();
        rltForn = new javax.swing.JMenuItem();
        menu_distribuicao = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        sair = new javax.swing.JMenu();

        jMenuItem1.setText("jMenuItem1");

        jPanel1.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 538, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 279, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("SYSGEST - Sistema de Gestão de Medicamentos e Materiais");
        setForeground(new java.awt.Color(255, 255, 255));
        setName("principal"); // NOI18N
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(null);

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/relatorio.png"))); // NOI18N
        getContentPane().add(jButton1);
        jButton1.setBounds(30, 10, 60, 60);

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/entrada.png"))); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton2);
        jButton2.setBounds(130, 10, 60, 60);

        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/saida.png"))); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton3);
        jButton3.setBounds(230, 10, 60, 60);

        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/ajuda.png"))); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton4);
        jButton4.setBounds(330, 10, 60, 60);

        btSairtela.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/sair.png"))); // NOI18N
        btSairtela.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSairtelaActionPerformed(evt);
            }
        });
        getContentPane().add(btSairtela);
        btSairtela.setBounds(430, 10, 60, 60);

        jLabel4.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("Saidas");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(230, 70, 60, 20);

        jLabel3.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Entradas");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(130, 70, 60, 20);

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("Relatorio");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(30, 70, 60, 20);

        jLabel5.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.setText("Ajuda ");
        jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        getContentPane().add(jLabel5);
        jLabel5.setBounds(330, 60, 60, 40);

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("Sair");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(450, 70, 21, 20);

        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/SYSGEST/br/imagens/barra-azul-tela-principal.png"))); // NOI18N
        getContentPane().add(jLabel9);
        jLabel9.setBounds(0, 0, 790, 90);

        jLabel1.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N
        jLabel1.setText("Usuário.:");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(10, 470, 64, 18);

        LabelUsuario.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N
        LabelUsuario.setText("?");
        getContentPane().add(LabelUsuario);
        LabelUsuario.setBounds(80, 470, 170, 18);

        menu_cadastro.setBackground(new java.awt.Color(255, 255, 255));
        menu_cadastro.setMnemonic('C');
        menu_cadastro.setText("Cadastro");
        menu_cadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menu_cadastroActionPerformed(evt);
            }
        });

        cadFunci.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK));
        cadFunci.setText("Funcionários");
        cadFunci.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadFunciActionPerformed(evt);
            }
        });
        menu_cadastro.add(cadFunci);

        prod.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        prod.setText("Produtos");
        prod.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                prodActionPerformed(evt);
            }
        });
        menu_cadastro.add(prod);

        cadFornecedor.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
        cadFornecedor.setText("Fornecedor");
        cadFornecedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cadFornecedorActionPerformed(evt);
            }
        });
        menu_cadastro.add(cadFornecedor);

        setor.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        setor.setText("Setor");
        setor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                setorActionPerformed(evt);
            }
        });
        menu_cadastro.add(setor);

        undS.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));
        undS.setText("Unidade Saúde");
        undS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                undSActionPerformed(evt);
            }
        });
        menu_cadastro.add(undS);

        jMenuBar1.add(menu_cadastro);

        menu_relatorios.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        menu_relatorios.setMnemonic('R');
        menu_relatorios.setText("Relatorios");

        rlProdutos.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));
        rlProdutos.setText("Entrada de Produtos");
        rlProdutos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rlProdutosActionPerformed(evt);
            }
        });
        menu_relatorios.add(rlProdutos);

        rlSaidaProd.setText("Saídas de Produtos");
        rlSaidaProd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rlSaidaProdActionPerformed(evt);
            }
        });
        menu_relatorios.add(rlSaidaProd);

        rlESF.setText("Unidade de Saúde");
        rlESF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rlESFActionPerformed(evt);
            }
        });
        menu_relatorios.add(rlESF);

        relFunc.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.ALT_MASK));
        relFunc.setText("Funcionarios");
        relFunc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                relFuncActionPerformed(evt);
            }
        });
        menu_relatorios.add(relFunc);

        rltForn.setText("Fornecedores");
        rltForn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rltFornActionPerformed(evt);
            }
        });
        menu_relatorios.add(rltForn);

        jMenuBar1.add(menu_relatorios);

        menu_distribuicao.setMnemonic('D');
        menu_distribuicao.setText("Distribuição");

        jMenuItem3.setText("Entrada");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        menu_distribuicao.add(jMenuItem3);

        jMenuItem2.setText("Saída");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        menu_distribuicao.add(jMenuItem2);

        jMenuBar1.add(menu_distribuicao);

        sair.setText("Sair");
        sair.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        sair.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                sairMouseClicked(evt);
            }
        });
        sair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                sairActionPerformed(evt);
            }
        });
        jMenuBar1.add(sair);

        setJMenuBar(jMenuBar1);

        setSize(new java.awt.Dimension(764, 563));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void sairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sairActionPerformed
        // TODO add your handling code here:
        System.exit(0);


    }//GEN-LAST:event_sairActionPerformed

    private void sairMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sairMouseClicked
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_sairMouseClicked

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened


    }//GEN-LAST:event_formWindowOpened

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        AtenticaLoginEntrada atentica = new AtenticaLoginEntrada();
        atentica.setVisible(true);
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton4ActionPerformed

    private void btSairtelaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSairtelaActionPerformed
        // TODO add your handling code here:
        System.exit(0);
    }//GEN-LAST:event_btSairtelaActionPerformed

    private void menu_cadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_cadastroActionPerformed
        // TODO add your handling code here:

    }//GEN-LAST:event_menu_cadastroActionPerformed

    private void setorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_setorActionPerformed
        // TODO add your handling code here
        TelaSetor s = new TelaSetor();
        s.setVisible(true);
    }//GEN-LAST:event_setorActionPerformed

    private void cadFornecedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadFornecedorActionPerformed
        // TODO add your handling code here:
        TelaFornecedor f = new TelaFornecedor();
        f.setVisible(true);
    }//GEN-LAST:event_cadFornecedorActionPerformed

    private void prodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prodActionPerformed
        // TODO add your handling code here:
        TelaCadastroProduto p = new TelaCadastroProduto();
        p.setVisible(true);
    }//GEN-LAST:event_prodActionPerformed

    private void cadFunciActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadFunciActionPerformed
        // TODO add your handling code here:
        TelaFuncionarios t = new TelaFuncionarios();
        t.setVisible(true);
    }//GEN-LAST:event_cadFunciActionPerformed

    private void undSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_undSActionPerformed
        // TODO add your handling code here:
        TelaUndSaude und = new TelaUndSaude();
        und.setVisible(true);
    }//GEN-LAST:event_undSActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        AtenticaLoginSaida atentica = new AtenticaLoginSaida();
        atentica.setVisible(true);
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        AtenticaLoginEntrada atentica = new AtenticaLoginEntrada();
        atentica.setVisible(true);


    }//GEN-LAST:event_jButton2ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        AtenticaLoginSaida atentica = new AtenticaLoginSaida();
        atentica.setVisible(true);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void relFuncActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_relFuncActionPerformed
        //Relatorio de Funcionario
        RelFunci rlfu = new RelFunci();
        rlfu.setVisible(true);
    }//GEN-LAST:event_relFuncActionPerformed

    private void rlProdutosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rlProdutosActionPerformed
        // Relatorio de ENTRADA DE PRODUTOS
        RelEntrada rlent = new RelEntrada();
        rlent.setVisible(true);


    }//GEN-LAST:event_rlProdutosActionPerformed

    private void rltFornActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rltFornActionPerformed
        // Relatorio Fornecedores
        RelFornecedor fn = new RelFornecedor();
        fn.setVisible(true);
    }//GEN-LAST:event_rltFornActionPerformed

    private void rlESFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rlESFActionPerformed
        // RELATORIO DE UND SAUDE

        RelatorioUnidadesSaude rlund = new RelatorioUnidadesSaude();
        rlund.setVisible(true);

    }//GEN-LAST:event_rlESFActionPerformed

    private void rlSaidaProdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rlSaidaProdActionPerformed
        // TODO add your handling code here:
        RelSaida rlSaida = new RelSaida();
        rlSaida.setVisible(true);
    }//GEN-LAST:event_rlSaidaProdActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Principal(null).setVisible(true);

            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel LabelUsuario;
    private javax.swing.JButton btSairtela;
    private javax.swing.JMenuItem cadFornecedor;
    private javax.swing.JMenuItem cadFunci;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JMenu menu_cadastro;
    private javax.swing.JMenu menu_distribuicao;
    private javax.swing.JMenu menu_relatorios;
    private javax.swing.JMenuItem prod;
    private javax.swing.JMenuItem relFunc;
    private javax.swing.JMenuItem rlESF;
    private javax.swing.JMenuItem rlProdutos;
    private javax.swing.JMenuItem rlSaidaProd;
    private javax.swing.JMenuItem rltForn;
    private javax.swing.JMenu sair;
    private javax.swing.JMenuItem setor;
    private javax.swing.JMenuItem undS;
    // End of variables declaration//GEN-END:variables

}
